<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title>商品回收</title>
</head>
<body>
<a href="index.php?act=goods&op=goods_add">添加</a>

<form method="post" action="index.php?act=goods&op=goods_collect">
    <select name="search_field">
        <?php foreach($goods_fields as $k=>$v){?>
        <option value="<?php echo $k?>"><?php echo $v?></option>
        <?php }?>
    </select>
    <input type="text" name="field_value" value="<?php echo !empty($_POST['field_value'])?$_POST['field_value']:''?>">
<input type="submit" value="查询">
</form>

<form action="index.php?act=goods&op=goods_del_more" method="post" id="del_more">
</form>
<table>
    <tr><th><input form="del_more" type="submit" value="删除多个" onclick="javascript:return confirm('确定删除吗？')" /></th><th>编号</th><th>商品名称</th><th>所属分类</th><th>商品价格</th><th>缩略图</th><th>操作</th></tr>
    <?php if(!empty($goods_list) && is_array($goods_list)){?>
<?php foreach($goods_list as $v){?>
    <tr>
        <td><input form="del_more" type="checkbox" name="del[]" value="<?php echo $v['good_id']?>"></td>
        <td><?php echo $v['good_id']?></td>
        <td><?php echo $v['good_name']?></td>
        <td align="center"><?php echo $v['cate_name']?></td>
        <td><?php echo $v['good_price']?></td>
        <td><img alt="暂时没有图片" width="100" height="100" title="<?php echo $v['good_thumb']?>" src="<?php echo SITE_URL.DS.$v['good_thumb']?>"></td>
        <td><a href="index.php?act=goods&op=goods_del_real&goods_id=<?php echo $v['good_id']?>" onclick="return confirm('确定永久删除吗？')">永久删除</a> | <a href="index.php?act=goods&op=goods_restore&goods_id=<?php echo $v['good_id']?>">还原</a></td>
    </tr>
<?php }}else{?>
        <tr style="color:red;text-align:center"><td colspan="6">暂无数据</td></tr>
    <?php }?>
    <tr><td><input type="button" value="全选" id="sel_all"></td><td colspan="<?php echo count($v)+1?>"><?php echo $page_str?></td></tr>
    </table>

</body>
</html>